import axios from 'axios';
const CURENTDATE = new Date().getTime();
export default function selfNaxios(config, successCallback, errorCallback){
  config.url = config.url+"?isAjax=1&ieStamp=" + CURENTDATE;
  axios(config)
  .then(function(res){
        if (res.data && res.data.needrelogin&& process.env.NODE_ENV === 'production') {
            parent.location.reload();
        }
    successCallback && successCallback(res)
  })
  .catch(function(error){
         errorCallback && errorCallback(error)
    })

 }